import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Index from '../components/qiantai/Index.vue'
import LastNav from '../components/houtai/LastNav.vue'
import BookPage from '../components/qiantai/BookPage.vue'
import Order from '../components/qiantai/Order.vue'
import PersonalPage from '../components/qiantai/PersonalPage.vue'
import Alipay from '../components/qiantai/Alipay.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      redirect: '/index',
      children:[
  
     {
      path: '/index',
      name: 'index',
      component: Index
        },
        {
      path: '/bookpage',
      name: 'bookpage',
      component: BookPage
        },
        {
          path: '/order',
          name: 'order',
          component:Order
        },
        {
          path:'/personalpage',
          name:'personalpage',
          component:PersonalPage
        },
        {
          path: '/alipay',
          name: "Alipay",
          component:Alipay
        }
   ]
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/register',
      name: 'register',
      component:Register
      

    },
  
    // {
    //   path: '/lastnav',
    //   name: 'lastnav',
    //   component:LastNav
    // }
  ]
})

export default router
